package edu.lmu.cs.dhara.roflkode.entities;

import edu.lmu.cs.dhara.util.Log;

/**
 * A condition/block pair (if-statements are made up of a bunch of
 * these).
 */
public class Case extends Entity {
    private Expression condition;
    private Block body;

    public Case(Expression condition, Block body) {
        this.condition = condition;
        this.body = body;
    }

    public Expression getCondition() {
        return condition;
    }

    public Block getBody() {
        return body;
    }

    /**
     * Analyzes the case.
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
//        condition.analyze(log, table);
//        if (condition.type != Type.BOOLEAN) {
//            log.error("if_condition_not_boolean");
//        }
//        body.analyze(log, table, f, inLoop);
    }
}
